

//
const allList = []

//获取allList每一项的idx并拼接  1*2*3*4*5*6*7*8*9*10类似
export function getIdx(arr) {
    let str = ''
    //最后一位不带*
    for (let i = 0; i < arr.length - 1; i++) {
        str += arr[i].idx + '*'
    }
    str += arr[arr.length - 1].idx
    return str
}

export function changeList(statuslist, allList) {
    statuslist.forEach(item => {
        // const start = new Date().getTime();
        // let count = 0;
        for (const list of allList) {
            // count++;
            if (item.idx === list.idx) {
                list.value = item.value;
                // console.log(list, item, '找到了');
                break; // 找到了就退出内循环
            }
            // console.log("时间戳", new Date().getTime());
        }
        // console.log("内循环次数", count);
        // const end = new Date().getTime();
        // console.log(start);
        // console.log("耗时", end - start);
    });
    return allList
}
